<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>iframe标签</title>
    <style>
        #show {
            width: 100%;
            height: 500px;
        }
    </style>
    <script>
        window.onload = function() {
            let btn = document.getElementById("btn");
            let tx = document.getElementById("tx");
            let show = document.getElementById("show");
            btn.onclick = function () {
                show.src = tx.value;
            }
        }
    </script>
</head>
<body>
    <div>
        <p>地址：</p>
        <p>
            <label for="tx"></label>
            <input type="text" id="tx">
            <button id="btn">提交</button>
        </p>
    </div>

    <div>
        <iframe id="show"></iframe>
    </div>
</body>
</html>